﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TeJiaPanel : MonoBehaviour
{
    public GameObject ZheZhaoImage;
    public Button BuyButton;
    public GameObject TeJia;
    void Start()
    {
        ZheZhaoImage = MainPanel.instance.ZheZhaoImage;
        //BuyButton.onClick.AddListener(OnClickBuyButton);
        TeJia = GameObject.FindGameObjectWithTag("TeJia");
    }
    /// <summary>
    /// /确认购买
    /// </summary>
    public void OnClickBuyButton()
    {
        ShortVoice.instance.PlayVoice("AnNiu");
        DataManager.Instance.HaveThird = 1;
        DataManager.Instance.HaveFourth = 1;
        DataManager.Instance.Save();
        ZheZhaoImage.GetComponent<Image>().color = new Color(0, 0, 0, 0);
        ZheZhaoImage.GetComponent<Image>().raycastTarget = false; 
        TeJia.SetActive(false);
    }
}
